package cn.da.shuai.cool.mq.mqtt.controller;


import cn.da.shuai.cool.mq.mqtt.service.ClientService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/paho")
public class MqttPahoController {

    @Resource
    private ClientService clientService;

    @GetMapping("/send")
    public void send(@RequestParam String topic, @RequestParam String message) {
        clientService.send(topic, message);
    }

}
